﻿using UnityEngine;
using System.Collections;

public class Bullet :MonoBehaviour{


	void Start()
	{
		Destroy (gameObject,7);
	}

	void OnTriggerEnter(Collider c){
		if(c.gameObject.tag == "ro" && gameObject.tag=="egg")
		{
			Score.diem++;
			if(Score.donvi==9)
			{
				Score.donvi=-1;
				Score.chuc++;
			}
			Score.donvi++;
			Destroy (gameObject);
		}

		if(c.gameObject.tag == "ro" && gameObject.tag=="shit")
		{
			Score.lose++;
			Destroy (gameObject);
			
		}
		if(c.gameObject.tag == "day2" && gameObject.tag =="egg")
		{
			Score.vuottrung++;
		}
	}
}
